xentrace: restrict trace buffer MFNs
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 28 Jun 2010 15:27:56 +0000 (16:27 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 28 Jun 2010 15:27:56 +0000 (16:27 +0100)
Since they're being passed to Dom0 using an array of uint32_t, they
must be representable as 32-bit quantities, and hence the buffer
allocation must specify an upper address boundary.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/trace.c

index 132849ac9624668464538f8465bf7beeb3e8a857..9884f6ad6ed8e36690c0ead81cac7a51b4c039ec 100644 (file)
@@ -130,7 +130,8 @@ static int alloc_trace_bufs(void)
         char         *rawbuf;
         struct t_buf *buf;
 
-        if ( (rawbuf = alloc_xenheap_pages(order, 0)) == NULL )
+        if ( (rawbuf = alloc_xenheap_pages(
+                order, MEMF_bits(32 + PAGE_SHIFT))) == NULL )
         {
             printk("Xen trace buffers: memory allocation failed\n");
             opt_tbuf_size = 0;